package com.retail.lottery.colalottery.exception;

import com.retail.lottery.colalottery.enums.ErrorCodeEnum;

public class BadRequestException  extends RuntimeException {
    private Integer code;

    public BadRequestException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public BadRequestException(ErrorCodeEnum errorCode) {
        super(errorCode.getMessage());
        this.code = errorCode.getCode();
    }

}
